package com.face.server.entity;

import lombok.Data;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 申请
 */
@Document
@Data
public class Apply extends Entity {

    private Date applyTime;

    // 申请标题
    @NotNull
    private String applyDesc;

    // 0 未审核 ; 1 审核不通过; 2 审核通过
    private int status;

    // 申请原因
    @NotNull
    private String cause;

    @NotNull
    private String visitorName;

    @NotNull
    private String visitorPhone;

    @NotNull
    private String visitorIdentity;

    @NotNull
    private String relative;

    @DBRef
    private Student student;

    private String adminUserName;

    @NotNull
    private Date effectDate;

    @NotNull
    private Date finishDate;

    private int type; // 0 增加访问者， 1 延长访问时间
}
